<!DOCTYPE html>
<html>
<@h.head />
<body class="homepage">
	<@h.nav />
	<div class="h84"></div>
	<div class="search">
		<div class="container">
			<h3>岱宇产品防伪查询</h3>
			<p class="para">
			</p>
			<div class="search-contact">
				<form onsubmit="return false">
				<input type="text" name="code" placeholder="请输入产品防伪码" maxlength="20">
				<input type="submit" value="">
				</form>
			</div>
		</div>
	</div>
	<@h.foot />
</body>
<script type="text/javascript">
	$(function(){
		
		$("[type=submit]").click(function(){
			var data = {};
			data.code = $("[name=code]").val().trim();
			if (data.code == ""){
				alert("请输入产品防伪码");
				return false;
			}
			$.ajax({
			  type: 'POST',
			  url: "${path}/search/searchCode/query",
			  data : data,
			  dataType: "json",
			  success: function(result){
				  if(result.Statu == 1) {
					 if(result.Msg == "0") {
						 $(".para").html("该商品为官方正品！防伪码:" + result.JsonData.t_code + ",防伪码编号:" + result.JsonData.t_identifier + ",谢谢您的查询!");
					 } else {
						 $(".para").html("您所查询的防伪码已被查询过！查询次数:" + result.Msg + "次,防伪码:"+result.JsonData.t_code+",防伪码编号:" + result.JsonData.t_identifier);
					 }
					 
				  } else if(result.Statu == 0) {
					  $(".para").html("您所查询的防伪码没有记录，非本公司生产商品，请谨慎购买。或拨打查询专线再次确认！<br/> 查询专线：021-65068230转211(请于工作时间来电查询09：00～18：00)")
				  }
			  }
			});
		});
	});
</script>
</html>